<?php

declare(strict_types=1);

namespace App\Request\GuildManage;

use Hyperf\Validation\Request\FormRequest;

class ApplyWithdrawalRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        return [
            'withdraw_account_type' => 'integer|numeric|in:1,2',
            'withdraw_rmb' => 'required|numeric|gt:0',
            'account_id' => 'required|numeric|gt:0',
        ];
    }

    public function messages(): array
    {
        return [
            'withdraw_account_type.in' => '请选择正确的结算方式',
            'withdraw_rmb.required' => '请输入提现金额',
            'account_id.required' => '请选择一个提现账户'
        ];
    }
}
